Contents
NSButton.VBX Help Contents

This control allows you to display a button composed entirely of three different images.  This is an alternative to the standard gray buttons and those buttons that allow you to place an image on top instead of text.  This will enable you to create buttons of any shape or size.

The three images correspond to the normal visible state, the state when the mouse rolls over the control and lastly the third image is shown when the user clicks the control.  See our example bitmaps for a taste of what can be done.

Properties

Events

Hints

Distribution

Registration

About Nexus Solutions


Example Bitmaps

The following are example bitmaps that correspond to the up, rollover and down states of a typical NSButton control.  The examples do not have labels but these are easily added using the Caption property.

 This would be how the button would normally appear on your application.  This bitmap corresponds to the PictureUp property.

 This is the bitmap that would appear as soon as the mouse pointer rolls over the control.  Notice the slight glow on the orange circle.  Use the PictureMove property.

 When the user clicks on the control this bitmap is displayed.  Use the PictureDown property.


Properties

In addition to the standard control properties the NSButton control has the following properties.

MousePointer

PictureUp

PictureMove

PictureDown

Stretch


Events

All events are standard.


Hints

Visual Basic Version

This control is designed to be used with VB3 and 16-bit VB4.

Palette Problems

If using 256 color bitmaps for your buttons then undesirable color corruption may be observed on display adapters capable of only 256 color support.  Ensure that the three images that you choose for the various button states have a common palette.  Use a tool like PaintShop Pro to save and load palette information.  In addition there may be conflicts with other images on the same window.

24-bit color images will not be displayed correctly.  Reduce the colors to 256.

16 color bitmaps should work fine.

Control Arrays

If you want a control array then create it before writing any code.  I have occasionally noted that VB does not insert the Index as integer argument if you have already written code for an event.


Nexus Solutions

Nexus Solutions are a small multi-media company based in Brighton, England.  We specialize in producing fast loading Web sites and electronic catalogues and guides on floppy disk and CD.

Address

Nexus Solutions

The Media Centre

9-12 Middle Street

Brighton

East Sussex

England

BN1 1AL

Internet

Email: 	nexus@nexusdesign.com

Web:	htttp://www.nexusdesign.com

Compuserve:	106202,2341


Distribution

When distributing applications that use the NSButton control ensure that the NSBUTTON.VBX file is placed in the users \windows\system directory.


Registration

This custom control is shareware.  As such we would appreciate a small sum to go towards its continued development and the development of other similar controls.

A sum of $20 (US) or  £15 (UK) is required for registration.  You will receive the latest version of the control, without the unregistered warning message, by email.

Contact Nexus Solutions directly or register the software online if you have a Compuserve account - GO SWREG #15200.


MousePointer Property

The property is as standard controls except that the default mouse value of 0 corresponds to a pointing finger and not an arrow.


PictureUp
PictureUp Property

This is the bitmap that displays the default look of the button.  This is the Up state.

The property can be used in a similar way to the Picture property of a standard PictureBox control.


PictureMove Property

This is the bitmap that is displayed when the mouse cursor moves over the control.  This is the MouseMove state.   It can be used to give the button a glowing effect, for example, when the cursor moves over the control.

The property can be used in a similar way to the Picture property of a standard PictureBox control.


PictureDown Property

This is the bitmap that is displayed when the user holds the mouse button down while the cursor is over the control.  This is the Down state.  This property can be used, for example, to give the button an indented look.

The property can be used in a similar way to the Picture property of a standard PictureBox control.


Stretch Property

Allows you to force the bitmaps to stretch or shrink to the size of the control, otherwise the bitmaps remain at their original sizes.

Usage

[form.]NSButton.Stretch = { True | False }

This property is disabled in the unregistered shareware version.